﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Perceiveit.Xml.Converters
{

    #region public class CharXConverter : XConverter<char>

    public class CharXConverter : XConverter<char>
    {
        public override char FromString(string value)
        {
            char v;
            if (string.IsNullOrEmpty(value) || !char.TryParse(value, out v))
                v = char.MinValue;

            return v;
        }

        public override string ToString(char value)
        {
            return value.ToString();
        }
    }

    #endregion
}
